package com.kaibes.platform.file.server.admin;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import com.kaibes.web.admin.AdminMenu;
import com.kaibes.web.admin.AdminMenuConfig;
import com.kaibes.web.admin.AdminMenuUtils;

@Component
public class FileServerRunner implements ApplicationRunner {

	@Autowired
    private AdminMenuConfig adminMenuConfig;
	
	@Override
	public void run(ApplicationArguments args) throws Exception {
		AdminMenu menu = AdminMenuUtils.findMenuByKey(adminMenuConfig.getAdminMenus(), "file-manage");
		menu.setName("文件服务端");
		menu.setIcon("fas fa-server");
	}

}
